import React from 'react';
import { Redirect, connect } from 'umi';


const Authorized = ({
  children,
  route = {
    routes: [],
  },
  location = {
    pathname: '',
  },
  user,
}) => {
  const { currentUser } = user;
  const { routes = [] } = route;
  const isLogin = currentUser && currentUser.name;
  console.log(routes,location)
  return (
    (<>
      {children}
    </>)
  );
};

export default connect(({ user }) => ({
  user,
}))(Authorized);

